#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    connect(this,&Widget::mySignal,this,&Widget::handleMysignal);

}

Widget::~Widget()
{
    delete ui;
}

void Widget::handleMysignal(const QString& text)
{
    this->setWindowTitle(text);
}


void Widget::on_pushButton_clicked()
{
    emit mySignal("带信号1的参数"," ");
}

void Widget::on_pushButton_2_clicked()
{
   emit mySignal("带信号2的参数"," ");
}
